<template>
	<view id="list">
		<view>
			<view> <text>诊断时间</text><text>{{db.treattime}}</text></view>
			<view v-for="(item,index) in db.json" :key="index"><text>{{item.format}}</text><text>{{item.info}}</text></view>
			<view class="msg">
				{{db.intro}}
			</view>
			<view class="images">
				<image v-for="(item,index) in db.images" :src="item" mode="aspectFill"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				db:{}
			};
		},
		onLoad(o) {
			this.def_info(o.id)
		},
		methods:{
			async def_info(history_id){
				let a = await this.$u.api.indexhistory_info({history_id})
				console.log(a,'既往史详情');
				this.db = a.data
			}
		}
	}
</script>

<style lang="scss">
	#list{
		margin-top: 20rpx;
		overflow: hidden;
		>view{
			padding: 0 40rpx;
			border-radius: 20rpx;
			width: 95%;
			margin: auto;
			background-color: #FFFFFF;
			margin-bottom: 20rpx;
			>view{
				display: flex;
				align-items: center;
				justify-content: space-between;
				border-bottom: 1px solid #F1F1F1;
				padding: 35rpx 0;
				&.images{
					justify-content: flex-start;
					image{
						width: 120rpx;
						height: 120rpx;
						margin-right: 20rpx;
					}
				}
			}
			.msg{
				margin-top: 30rpx;
				padding: 40rpx;
				height: auto;
				border-radius: 20rpx;
				background-color: #F8F8F8;
				border: 1px solid #EAEAEA;
			}
		}
	
		.submit{
			width: 80%;
			margin: 50rpx auto;
			text-align: center;
			padding: 20rpx;
			border-radius: 50rpx;
		}
	}
</style>
